package com.yanmaohu.nikita.data.function;

import com.yanmaohu.nikita.data.Type;
import com.yanmaohu.nikita.data.TypeModifier;
import com.yanmaohu.nikita.data.expression.NameExpression;

/**
 * @author Bright Lee
 */
public final class Function extends Type {

    private ParameterList parameterList;
    private FunctionBody functionBody;

    public Function(TypeModifier typeModifier,
                    NameExpression functionName,
                    ParameterList parameterList,
                    FunctionBody functionBody) {
        super(typeModifier, functionName);
        this.parameterList = parameterList;
        this.functionBody = functionBody;
    }

    public int getEndIndex() {
        return functionBody.getEndIndex();
    }

    public ParameterList getParameterList() {
        return parameterList;
    }

    public FunctionBody statementList() {
        return functionBody;
    }

}
